function countdown(time){
    var nowtime=new Date();
    var overtime=new Date(time);
    var times=(overtime-nowtime)/1000;
    var d=parseInt(times/60/60/24);
    d=d<10?'0'+d:d;
    var h=parseInt(times/60.60%24);
    h=h<10?'0'+h:h;
    var m=parseInt(times/60%60);
    m=m<10?'0'+m:m;
    var s=parseInt(times%60);
    s=s<10?'0'+s:s;
    return d + '天' + h + '时' + m + '分' + s + '秒';
}
console.log(countdown('2021-9-25 09:00:00')); 